<template>
    <Huangheader />
    <div class="not-found-container">
      <img src="@/assets/images/404.png" alt="404 页面" class="not-found-image" />
      <h2>页面未找到</h2>
      <p>你访问的页面不存在，可能已被删除或地址错误。</p>
      <button @click="goHome">返回首页</button>
    </div>
  </template>
  
  <script setup>
  import { useRouter } from 'vue-router'
  
  const router = useRouter()
  
  const goHome = () => {
    router.push('/')
  }
  </script>
  
  <style scoped>
  .not-found-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5vh 2rem;
    text-align: center;
    min-height: 80vh;
    background-color: #f5f7fa;
    box-sizing: border-box;
  }
  
  .not-found-image {
    max-width: 100%;
    width: 400px;
    height: auto;
    margin-bottom: 24px;
  }
  
  h2 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 12px;
  }
  
  p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 24px;
    padding: 0 1rem;
  }
  
  button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  button:hover {
    background-color: #66b1ff;
  }
  
  /* 响应式设计：小屏幕适配 */
  @media (max-width: 480px) {
    .not-found-container {
      padding: 3vh 1rem;
    }
  
    h2 {
      font-size: 1.5rem;
    }
  
    p {
      font-size: 0.9rem;
    }
  
    .not-found-image {
      width: 90%;
    }
  }
  </style>
  